package com.xl.gradledemo.base

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import androidx.lifecycle.ViewModelStore

abstract class BaseActivity : AppCompatActivity() {

    abstract fun getLayout(): Int
    abstract fun getBinding(viewDataBinding: ViewDataBinding)
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        var viewDataBinding: ViewDataBinding = DataBindingUtil.setContentView(this, getLayout())
        getBinding(viewDataBinding)
    }

}